package tools

import (
	"gopkg.in/yaml.v2"
	"io/ioutil"
)

//FileYML parse yml data from file
//v will be a pointer of object
func FileYML(path string, v interface{}) error {
	data, err := ioutil.ReadFile(path)
	if err != nil {
		return err
	}
	return yaml.Unmarshal(data, v)
}
